import 'package:flutter/material.dart';

class InteractiveViewerPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('模板'),
      ),
      //  InteractiveViewer 缩放布局
      body: InteractiveViewer(
        constrained: false,
        maxScale: 5,
        minScale: 0.1,
        child: SizedBox(
          width: 800,
          child: LayoutBuilder(
            builder: (BuildContext context, BoxConstraints constraints) {
              print("$constraints");
              return Column(
                children: [Text('data' * 2000)],
              );
            },
          ),
        ),
      ),
    );
  }
}
